from waveapi import events
from waveapi import model
from waveapi import robot
from mark import Markky
import logging

def main():
    if __name__ == '__main__':
        myRobot = robot.Robot('sylowRobotZero'                              
                        ,image_url='http://myapp.appspot.com/icon.png'  
                        ,version='1'                                    
                        ,profile_url='http://myapp.appspot.com/' )
                        
        mark = Markky.Mark()
                        
        #    myRobot.RegisterHandler(events.WAVELET_PARTICIPANTS_CHANGED , OnParticipantsChanged)
        myRobot.RegisterHandler(events.WAVELET_SELF_ADDED           , mark.OnRobotAdded)
        myRobot.RegisterHandler(events.WAVELET_BLIP_CREATED         , mark.OnBlipSubmitted)
        myRobot.RegisterHandler(events.BLIP_SUBMITTED               , mark.OnBlipSubmitted)
        myRobot.Run() 

if __name__ == "__main__":
    logging.getLogger().setLevel(logging.DEBUG)
    main()